SET(TARGET_NAME "btests")
SET(TARGET_DIR bin/${BIN_FOLDER}/modules/)

INCLUDE_DIRECTORIES (./)
INCLUDE_DIRECTORIES (../../include)

INCLUDE_DIRECTORIES(${LUNA_INC_DIR})

INCLUDE_DIRECTORIES(${WX_INC_DIR})
LINK_DIRECTORIES (${WX_LIB_DIR})

INCLUDE_DIRECTORIES(${LUA_INC_DIR})
LINK_DIRECTORIES (${LUA_LIB_DIR})

ADD_DEFINITIONS(${WX_FLAGS})
ADD_DEFINITIONS(-DLUNA_BINDINGS)
ADD_DEFINITIONS(-Wno-deprecated)

FILE(GLOB_RECURSE PUBLIC_HEADERS "../../include/*.h")

FILE(GLOB_RECURSE BINDING_FILES "*.cpp")
FILE(GLOB_RECURSE COMMON_FILES "../sgtApp.cpp")

ADD_LIBRARY (${TARGET_NAME} SHARED ${LUNA_IMP_FILE} ${PUBLIC_HEADERS} ${BINDING_FILES} ${COMMON_FILES})

ADD_PRECOMPILED_HEADER( ${TARGET_NAME} ../../include/plug_common.h) 

SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES 
	PREFIX ""
	SUFFIX ".sgp")
	
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${LUA_LIBS} ${WX_LIBS} ${FLAVOR_LIBS} ${GL_LIBS})  

INSTALL(TARGETS ${TARGET_NAME}
	RUNTIME DESTINATION ${TARGET_DIR}
	LIBRARY DESTINATION ${TARGET_DIR})
	